<%
	org.languageguide.user.User user = org.languageguide.user.UserManager.getUser(session);
	if (user == null){
		String target = request.getParameter("target");
		String uri = request.getRequestURI();
		String queryString = request.getQueryString();
		if (queryString != null){
			session.setAttribute("redirect_url", uri + "?" + queryString);
		}
		else{
			session.setAttribute("redirect_url", uri);
		}
		if (target != null){
			response.sendRedirect("../user/login.jsp?target=" + target);
		}
		else{
			response.sendRedirect("../user/login.jsp");
		}
	}
%>